package com.geeguo.ebuilder.operation.business.system.user.service;

import com.geeguo.ebuilder.core.common.model.vo.PageListVO;
import com.geeguo.ebuilder.operation.business.system.user.model.*;

import java.util.Date;
import java.util.List;

public interface UserService {

    PageListVO<UserVO> list(UserQuery query);
    PageListVO<UserSimpleVO> listSimple(UserQuery query);

    List<UserSimpleVO> search(String realName);

    UserEntity get(String id);
    UserEntity getByCertificate(String certificate);
    UserCO getCached(String id);

    boolean save(UserEntity user, List<String> roles);

    boolean update(UserEntity current, UserEntity old, List<String> roles);

    boolean updatePassword(String id, String password, Date modifyTime, String modifyUser);

    boolean updateLastLogin(String id);

    boolean remove(String id);

    boolean existsUsername(String username);

    boolean existsMobile(String mobile);

    boolean existsEmail(String email);
}
